Skip to content

feat(entropy): add Set Custom Gas Limits guide #765

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 25, 2025

Conversation

devin-ai-integration[bot]
Copy link
Contributor

Description

Created a comprehensive "Set Custom Gas Limits" guide for Pyth Entropy that builds upon the existing EVM integration guide. The guide shows developers how to use the requestV2(uint32 gasLimit) method variant and corresponding getFeeV2(uint32 gasLimit) fee calculation for scenarios requiring custom gas limits in entropy callbacks.

This addresses the user request to create documentation that references the existing EVM guide as a prerequisite and demonstrates the specific method variants from the IEntropyV2.sol interface.

Type of Change

  • New Page
  • Page update/improvement
  • Fix typo/grammar
  • Restructure/reorganize content
  • Update links/references
  • Other (please describe):

Areas Affected

  • pages/entropy/generate-random-numbers/set-custom-gas-limits.mdx (new file)
  • pages/entropy/generate-random-numbers/_meta.json (navigation update)

Key Changes

  • New comprehensive guide covering custom gas limit usage scenarios
  • Code examples showing requestV2(uint32 gasLimit) and getFeeV2(uint32 gasLimit) methods
  • Gas limit constraints documentation including MAX_GAS_LIMIT and rounding rules
  • Best practices section with recommended gas limits and safety considerations
  • Complete working example demonstrating both simple and complex callback scenarios
  • Prerequisites section that references the existing EVM guide as requested

Critical Review Items

⚠️ High Priority - Code Accuracy

  • Verify Solidity code examples compile and match actual IEntropyV2.sol interface
  • Confirm gas limit constraints (MAX_GAS_LIMIT = 655,350,000, 10k rounding) are accurate
  • Test that method signatures match the referenced contract interface

⚠️ High Priority - Links & Navigation

  • Test all internal documentation links work correctly
  • Verify navigation integration in entropy section works properly
  • Confirm the guide properly references existing EVM guide as prerequisite

⚠️ Medium Priority - Technical Accuracy

  • Validate gas limit recommendations and best practices
  • Verify fee calculation explanations are correct
  • Check that constraint explanations match actual contract behavior

Checklist

  • I ran pre-commit run --all-files to check for linting errors (npm run lint passed)
  • I have reviewed my changes for clarity and accuracy
  • All links are valid and working (needs human verification)
  • Images (if any) are properly formatted and include alt text
  • Code examples (if any) are complete and functional (needs compilation testing)
  • Content follows the established style guide
  • Changes are properly formatted in Markdown
  • Preview renders correctly in development environment

Testing Performed

  • ✅ Local development server renders page correctly
  • ✅ Navigation integration works in local environment
  • ✅ Lint checks pass
  • ❌ Solidity code examples not compiled/tested (requires manual verification)
  • ❌ Internal links not fully tested (requires manual verification)

Related Issues

Addresses Slack request from Jayant to create custom gas limits guide building on existing EVM documentation.

Additional Notes

The guide follows the existing documentation patterns and includes comprehensive examples for both simple and complex callback scenarios. Gas limit constraints are based on the Entropy.sol contract constants, but should be verified against the latest contract version.

Contributor Information

Screenshots

Custom Gas Limits Guide Preview

The guide renders correctly with proper navigation, code highlighting, and formatting consistent with existing documentation.

- Add comprehensive guide for using custom gas limits with Pyth Entropy
- Show requestV2(uint32 gasLimit) and getFeeV2(uint32 gasLimit) usage
- Include gas limit constraints, best practices, and troubleshooting
- Build upon existing EVM guide as requested
- Update navigation to include new guide

Co-Authored-By: Jayant <[email protected]>
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link

vercel bot commented Jul 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 23, 2025 2:03pm
documentation ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 23, 2025 2:03pm

- Remove trailing whitespace
- Apply prettier formatting to code blocks and content
- Ensure compliance with repository style guidelines

Co-Authored-By: Jayant <[email protected]>
@aditya520 aditya520 merged commit 716dbcd into main Jul 25, 2025
5 checks passed
@aditya520 aditya520 deleted the devin/1753278133-entropy-custom-gas-limits branch July 25, 2025 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant